<?php

namespace app\command\command;

use think\console\Command;
use think\console\Input;
use think\console\Output;

class Test extends Command
{
    protected function configure()
    {
        $this->setName('test')
            ->setDescription('这是命令说明注释')
            ->addArgument('name')
            ->addArgument('sex');
    }

    protected function execute(Input $input, Output $output)
    {
        $name = $input->getArgument('name');
        $sex = $input->getArgument('sex');

        $output->writeln('Hello ' . $name . '--' . $sex);//在命令行界面输出内容
    }
}
